<extend name="Common:grid"/>
 <!-- 
 ------------------------------------------------------
 管理员页面
 ------------------------------------------------------
 -->
<block name="beforeGrid">
//取得管理组字符串
var groups=null;
if(isEmpty(groups)){
	groups=getJqgridStringData(BASE+"/admin/manage/key_value","group");
}
</block>

<block name="extOptions">
//修改表格参数
$.extend(defaultJqGridOptions,{
	colModel:[
		{name:"id",index:"id",hidden:true},
		{name:"username",index:"username",width:200,align:"left",sortable:false,editable:true,editrules:{required:true}},
		{name:"name",index:"name",width:300,align:"left",sortable:false,editable:true,editrules:{required:true}},
		{name:"password",index:"password",hidden:true,editable:true,edittype:"password",
			editrules:{edithidden:true},editoptions:{dataInit:function(elem){$(elem).val("");}},viewable:false},
		{name:"group_id",index:"group_id",hidden:false,align:"left",sortable:false,editable:true,edittype:"select",
			editrules:{edithidden:true},editoptions:{value:groups},formatter:"select"}
	],
	grouping:true,
   	groupingView : {
   		groupField:["group_id"],
   		groupColumnShow:[false],
   		groupText : ["<b>{0} - {1}人</b>"]
   	},
   	rowNum:0,
   	multiselect:true
});
$.extend(defaultPagerEditOptions,{recreateForm:true});
</block>
